package com.ln.prac.base.xiaoao.dataStructure;

import java.util.LinkedList;

/**
 * 基于{@link LinkedList}实现的栈
 *
 * @Author zhangj
 * @Date 2023/2/6 21:37
 */
public class MyLinkedStack<T> {

    LinkedList<T> list = new LinkedList<>();

    public void push(T e) {
        list.addFirst(e);
    }

    public T pop() {
        return list.pop();
    }

    public int size() {
        return list.size();
    }



}
